package com.example.harmonyosproject.server.mapper;

import com.example.harmonyosproject.pojo.Favorite;
import com.example.harmonyosproject.pojo.News;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface NewsMapper {
    void addNews(News news);

    List<News> getAll(Integer id);

    List<News> getSelf(Integer id);

    void addFavorite(Favorite favorite);

    List<News> getFavorite(Integer id);

    void deleteFavorite(Favorite favorite);

    Favorite isFavorite(Favorite favorite);

    void updateLike(Integer id);
}
